package com.topc.base.model;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

@Data
@ToString
public class PageParams {

    @ApiModelProperty("页码")
    private Long current;

    @ApiModelProperty("每页记录数")
    private Long pageSize;

    public PageParams(){
        current = 1L;
        pageSize = 30L;
    }

    public PageParams(long pageNo,long pageSize){
        this.current = pageNo;
        this.pageSize = pageSize;
    }

    public Page page(){
        return new Page(current,pageSize);
    }

}
